import request from '@/utils/request'

// 获取量测模型树结构
export const getPointStruTreeApi = (params?: any) => {
  return request({
    url: '/ems/pointStru/tree',
    method: 'get',
    params
  })
}

// 创建量测模型
export const createPointStruApi = (data: any) => {
  return request({
    url: '/ems/pointStru/add',
    method: 'post',
    data
  })
}

// 更新量测模型
export const updatePointStruApi = (data: any) => {
  return request({
    url: '/ems/pointStru/update',
    method: 'put',
    data
  })
}

// 删除量测模型
export const deletePointStruApi = (id: number) => {
  return request({
    url: `/ems/pointStru/del/${id}`,
    method: 'delete'
  })
}

// 获取量测模型详情
export const getPointStruDetailApi = (id: number) => {
  return request({
    url: `/station/pointStru/${id}`,
    method: 'get'
  })
}